<template>
  <div>
    <sale-client-detail :impedimentState="impedimentState"></sale-client-detail>
    <sale-service-detail :userName="userName" @getCurrentState="getCurrentState"></sale-service-detail>
    <sale-process :userName="userName" :impedimentState="impedimentState"></sale-process>
    <mend-list></mend-list>
  </div>
</template>

<script>
  import SaleClientDetail from './components/saleClientdetail'
  import SaleServiceDetail from './components/saleServiceDetail'
  import SaleUploadImage from './components/saleImage'
  import SaleProcess from './components/saleProcess'
  import MendList from './components/mendList'
  export default {
    name: "SaleDetail",
    components: {
      SaleClientDetail,
      SaleServiceDetail,
      SaleUploadImage,
      SaleProcess,
      MendList
    },
    data () {
      return {
        userName: '',
        impedimentState: 0
      }
    },
    methods: {
      getLocalStorageData () {
        this.userName = localStorage.getItem('phone');
      },
      getCurrentState (impedimentState) {
        this.impedimentState = impedimentState;
      }
    },
    mounted () {
      this.getLocalStorageData();
      console.log(this.$route.params)
    }
  }
</script>

<style scoped="scoped">

</style>
